﻿using System;
using System.Collections.Generic;
using System.Text;

using E.Model;
using E.DAL;

namespace E.BLL
{
    public class FeedBackBLL
    {
        private FeedBackDAL dal;

        public FeedBackBLL()
        {
            dal = new FeedBackDAL();
        }
        
        /// <summary>
        /// 添加反馈
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int AddFeedBack(FeedBackModel model)
        {
            return dal.AddFeedBack(model);
        }

        /// <summary>
        /// 获取反馈列表
        /// </summary>
        /// <param name="searchModel"></param>
        /// <param name="pageSize"></param>
        /// <param name="pageIndex"></param>
        /// <returns></returns>
        public FeedBackListModel GetFeedBackListByCondition(FeedBackModel searchModel, int pageSize, int pageIndex)
        {
            return dal.GetFeedBackListByCondition(searchModel, pageSize, pageIndex);
        }
        
        /// <summary>
        /// 获取反馈信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public FeedBackModel GetFeedBackInfo(int id)
        {
            return dal.GetFeedBackInfo(id);
        }

        /// <summary>
        /// 删除反馈
        /// </summary>
        /// <param name="feedbackid"></param>
        /// <returns></returns>
        public int DelFeedBack(string[] feedbackid)
        {
            return dal.DelFeedBack(feedbackid);
        }
    }
}
